async function checkUnique(baseUrl, table, field, value) {
    var params = { table: table, field: field, value: value };
    var boolean;
    await axios.get(baseUrl + "/cp/check_unique", { params }).then(res => {
        boolean = res.data.result;
    });
    return boolean;
}

async function checkUniqueNoMe(baseUrl, table, field, value, id) {
    var params = { table: table, field: field, value: value, object_id: id };
    var boolean;
    await axios.get(baseUrl + "/cp/check_unique_notme", { params }).then(res => {
        boolean = res.data.result;
    });
    return boolean;
}


export {
    checkUnique,
    checkUniqueNoMe
}